//
//  FlyCollectionIndexView.h
//  Test
//
//  Created by lifayu on 2017/9/7.
//  Copyright © 2017年 贵阳星力荐外电子商务有限公司. All rights reserved.
//

#import <UIKit/UIKit.h>

#define FlyCollectionViewIndexHeight  20

@class FlyCollectionIndexView;

@protocol FlyCollectionIndexViewDelegate <NSObject>
@optional

/**
 *  触摸到索引时的反应
 *
 *  @param collectionIndexView 触发的对象
 *  @param index               触发的索引的下标
 *  @param title               触发的索引的文字
 */
-(void)collectionIndexView:(FlyCollectionIndexView *)collectionIndexView didselectionAtIndex:(NSInteger)index title:(NSString *)title;

/**
 *  开始触摸索引
 *
 *  @param collectionIndexView 触发collectionIndexView对象
 */
- (void)collectionIndexViewTouchesBegan:(FlyCollectionIndexView *)collectionIndexView;


/**
 *  触摸索引结束
 */
- (void)collectionIndexViewTouchesEnd:(FlyCollectionIndexView *)collectionIndexView;


@end

@interface FlyCollectionIndexView : UIView

/**
 *  索引内容数组
 */
@property(nonatomic, strong)NSArray *indexs;

@property (strong, nonatomic) UIFont *indexFont;
@property (strong, nonatomic) UIColor *indexColor;

@property (strong, nonatomic) NSMutableArray *indexLabels;

@property(nonatomic, weak)id<FlyCollectionIndexViewDelegate> indexDelegate;

- (void)setIndexFont:(UIFont *)font color:(UIColor *)color;


@end
